#include"rational.h"
#include<algorithm>
#include<iostream>

int main(){
	Rational number1 = Rational(5);
	std::cout << "number1= " << number1  << '\n';
	Rational number2 = Rational(3, 5); 
	std::cout << "number2= " << number2  << '\n';
	Rational number3 = number2;
	std::cout << "number3= " << number3  << '\n';
	std::cout << "-number3= " << - number3 << '\n';

	number3 = number1;
	std::cout << "number3=number1= " << number3  << '\n';
	number3 += number2;
	std::cout << "number3 += number2 " << number3  << '\n';
	number3 -= number1;
	std::cout << "number3 -= number1" << number3  << '\n';
	number3 *= number1;
	std::cout << "number3 *= number1 " << number3 << '\n';
	number3 /= number2;
	std::cout << "number3 /= number2" << number3  << '\n';
	number3++;
	std::cout << "number3++ = " << number3  << '\n';
	++number1;
	std::cout << "++number1= " << number1  << '\n';
	number2--;
	std::cout << "number2-- = " << number2  << '\n';
	--number1;
	std::cout << "--number1= " << number1  << '\n';

	std::cout << "number1 + number2 = " << number1 + number2 << '\n';
	std::cout << "number3 - number1 = " << number3 - number1 << '\n';
	std::cout << "number3 * number1 = " << number3 * number1 << '\n';
	std::cout << "number1 / number3 = " << number1 / number3 << '\n';
	
	std::cout << "number1 == number2  " << (number1 == number2) << '\n';
	std::cout << "number1 < number2 = "  << (number1 < number2)  << '\n';
	std::cout << "number1 > number2 = "  << (number1 > number2)  << '\n';
	std::cout << "number1 >= number2 = " << (number1 >= number2) << '\n';
	std::cout << "number1 <= number2 = " << (number1 <= number2) << '\n';
	std::cout << "number1 != number2 = " << (number1 != number2) << '\n';

	std::cout << "number1 + 2 = " << number1 + 2 << '\n';
	std::cout << "number2 - 3 = " << number2 - 3 << '\n';
	std::cout << "5 * number3 = " << 5 * number3 << '\n';

	return 0;
}
